A portion of the disclosure of this patent document contains material that is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent disclosure, as it appears in the Patent and Trademark Office patent files or records, but otherwise reserves all copyright rights whatsoever.
The present invention generally relates to a method and system for enabling easy representation and processing of knowledge in the form of a set of rules stored in a repository.
A knowledge-based system uses knowledge to solve problems. It distinguishes between knowledge itself and the knowledge interpreter, which is called an Inference Engine.
Knowledge itself can be represented by two distinct sets of information. The first set is domain-specific data about the problem and the environment, the confidence measures and the xe2x80x9cdead endsxe2x80x9d in the environment. The second set of information is a collection of rules that express the conditions necessary to regulate the individual pieces of data in the first set, wherein the individual pieces of data represent facts about a steady state representation of the domain.
The Inference Engine is responsible for the execution process. The Inference Engine may employ some of the following principles:
Conflict resolution strategy, which specifies what rule to xe2x80x9cfirexe2x80x9d or execute first. Among commonly used strategies are the last recently used rule strategy or the most recently used rule strategy, etc.
Efficient pattern matching like the Markov Algorithm, which controls the search using a predefined order of rules to xe2x80x9cfirexe2x80x9d; or the Rete Algorithm, which speeds up the Markov Algorithm by looking only for changes in matches rather than for every rule every time.
Execution of the Right-Hand-Side of rules, which facilitates a certain kind of prediction of the possible behavior.
All the prior art methods and systems suffer from the lack of being persistent. They employ a technique of storing the facts and rules in the form of machine-level data in the memory of the computer system. They worked by evaluating the change in the data at each memory location due to a change in the environment. This dependency on storage made the data and the governing rules susceptible to erasure when the system was shutdown or was re-booted. This technique was a major problem in environments where such a system had to constantly monitor several inputs and process them continuously.
Another problem of the prior art was that if any change in the knowledge base had to be made, the data and the relationship to rules had to be physically updated at each location in memory, which could be a tedious and time consuming process. Hence, there is a need for using a model-based approach where the user could define relationships between sets of rules and data so that any update to the knowledge base could be made by applying the update to the root objects in the knowledge base and automatically propagating the update throughout the model. It was felt that a model-based approach to representation of domains would make the task of manipulating data and rules very simple.
Still another problem with the prior art was that the implementation of the Inference Engine was not extensible. This means that a particular implementation of the Inference Engine could not be customized to manage the execution of any knowledge system other than that for which it was defined. Thus, users had to build their own Inference Engine from scratch if they wanted fundamentally different behavior in the inference engine. This required considerable time and money to be expended for a relatively minor modification from an existing version. Also, sometimes the running Inference Engine itself needed to be changed in real time when it was executing rules in a mission critical environment. This was not possible since it would mean shutting down the entire environment and then carrying out the Inference Engine change. This was a costly, if not impossible exercise.
An object of the present invention is to provide a persistent store for all the rules and data representing a knowledge base.
Another object of the invention is to provide a model-based approach to knowledge representation that includes a repository-based object-oriented model.
Still another object of the present invention is the provision of extendible capability for manipulating the rules and facts as well the functionality of the Inference Engine.
An advantage of the present invention is that all objects of the type events, rule conditions, rules, and rule groups can be versioned to facilitate unique configuration of rules and conditions that may be enabled or disabled according to their version number.
Accordingly, the user is provided with an editing History to xe2x80x9cundoxe2x80x9d changes to the system.
Another feature of the present invention is the provision of a rule-editing interface, which can be easily adapted to virtually any end user.
An advantage of the present invention is the provision an open API to the system so that any client application can be written or modified for accessing the Inference Engine functionality in real time.
These and other objects, features and advantages will become apparent as the invention is described in detail below, wherein a method in a computer system having a persistent storage means executes a repository program for processing rules using a model resident within the storage means. The method includes the steps of storing in the persistent storage means the model, which comprises a set of rules and a set of facts defining event states, and both of these are stored as objects. The set of rules and set of facts comprise an object-oriented representation of the model. Next, a set of commands representing an extensible inference engine are loaded as meta objects into the persistent storage. The method accepts as inputs events representing alterations in the set of facts and determines which of the rules is associated with the alterations in the set of facts. The most salient one of the rules determined in the preceding step is selected, and then executed.
Still other objects, features and advantages of the present invention will become readily apparent to those skilled in the art from the following detailed description, wherein is shown and described only the preferred embodiment of the invention, simply by way of illustration of the best mode contemplated of carrying out the invention. As will be realized, the invention is capable of other and different embodiments, and its several details are capable of modifications in various obvious respects, all without departing from the invention. Accordingly, the drawings and description are to be regarded as illustrative in nature, and not as restrictive, and what is intended to be protected by Letters Patent is set forth in the appended claims. The present invention will become apparent when taken in conjunction with the following description and attached drawings, wherein like characters indicate like parts, and which drawings form a part of this application.